package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class FromSubquery implements InsertColumnsAndSource {

    private int beginIndex;
    private int endIndex;
    private IdentifierList insertColumnList;
    private OverrideClause overrideClause;
    private QueryExpression queryExpression;

    public FromSubquery(int beginIndex,
                        IdentifierList insertColumnList,
                        OverrideClause overrideClause,
                        QueryExpression queryExpression) {
        this.beginIndex = beginIndex;
        this.endIndex = queryExpression.getEndIndex();
        this.insertColumnList = insertColumnList;
        this.overrideClause = overrideClause;
        this.queryExpression = queryExpression;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public IdentifierList getInsertColumnList() {
        return insertColumnList;
    }

    public OverrideClause getOverrideClause() {
        return overrideClause;
    }

    public QueryExpression getQueryExpression() {
        return queryExpression;
    }

}
